package com.demo.pagers;

import com.demo.Finder;
import org.openqa.selenium.WebElement;

/**
 * Created by Administrator on 2017/7/7.
 */
public class PageCommon {

    private Finder finder;


    public PageCommon(Finder finder){
        this.finder = finder;
    }

    public WebElement getNewsTab(){
        return finder.findById("com.netease.newsreader.activity:id/y9",0);
    }

    public WebElement getMyTab(){
        return finder.findById("com.netease.newsreader.activity:id/y9",4);
    }

    public void clickNewsTab(){
//        getNewsTab().click();
        finder.click(getNewsTab());
    }

    public void clickMyTab(){
        finder.click(getMyTab());
    }

    public void clickMyTab2(){
        finder.findById("com.netease.newsreader.activity:id/a0o",8).click();
    }

}
